
using System;
using System.Diagnostics;
namespace MagickConverter
{
	
	
	public class CommandGenerator
	{
		private string ConvertUrl;
		private string InputUrl;
		private string InputType;
		private string OutputUrl;
		private string OutputName;
		private string OutputType;
		
		public CommandGenerator(string ConvertUrl, string InputUrl, string InputType, string OutputUrl, string OutputName, string OutputType)
		{
			this.ConvertUrl = ConvertUrl;
			this.InputUrl = InputUrl;
			this.InputType = InputType;
			this.OutputUrl = OutputUrl;
			this.OutputName = OutputName;
			this.OutputType = OutputType;
			FireCommand();
		}
		private void FireCommand() 
		{
			string Firethis;
			if (ConvertUrl == null) 
				ConvertUrl = "convert ";
			if (InputType != null)
				InputUrl = InputUrl + @"/*." + InputType;
			
			Firethis = ConvertUrl + " " + InputUrl + OutputUrl + @"/" + OutputName + @"." + OutputType;
			System.Diagnostics.Process.Start(Firethis);
			
			
		}
			
	}
}
